package com.hkemm.students;

public class Main {
    public static void main(String[] args) {
        Student[] stu = new Student[5];     //学生数组
        //学生1，文学系
        Literature stu1 = new Literature(10001,"张三","男",15);
        stu1.setSpeech(80);         //演讲分数
        stu1.setWorks(90);          //作品分数
        stu1.setMid_term(90);       //期中分数
        stu1.setFinal_term(89);     //期末分数
        //学生2，计算机系
        Computer stu2 = new Computer(10005,"李四","女",16);
        stu2.setOperation(95);          //操作分数
        stu2.setWrite_english(90);      //写作分数
        stu2.setMid_term(75);           //期中分数
        stu2.setFinal_term(80);         //期末分数
        //学生3，英语系
        English stu3 = new English(10002,"王五","男",17);
        stu3.setSpeech(90);         //演讲分数
        stu3.setMid_term(80);       //期中分数
        stu3.setFinal_term(76);     //期末分数
        //学生4，英语系
        English stu4 = new English(10003,"小红","女",17);
        stu4.setSpeech(88);         //演讲分数
        stu4.setMid_term(75);       //期中分数
        stu4.setFinal_term(70);     //期末分数
        //学生5，计算机系
        Computer stu5 = new Computer(10004,"小明","男",18);
        stu5.setOperation(82);          //操作分数
        stu5.setWrite_english(70);      //写作分数
        stu5.setMid_term(88);           //期中分数
        stu5.setFinal_term(90);         //期末分数

        stu[0] = stu1;
        stu[1] = stu2;
        stu[2] = stu3;
        stu[3] = stu4;
        stu[4] = stu5;

        int i = 0;
        while(i <stu.length && stu[i] != null){
            stu[i++].showGrade();
        }
    }
}
